package com.lianxueda.drawing.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 
 * @author 29264
 * @TableName courses
 */
@TableName(value ="courses")
@Getter
@Setter
@NoArgsConstructor
public class Courses implements Serializable {
    /**
     * 课程ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 课程名称
     */
    private String name;

    /**
     * 课程总次数
     */
    private Integer count;

    /**
     * 已上课次数
     */
    @TableField(value = "comCount")
    private Integer comCount;

    /**
     * 剩余次数
     */
    @TableField(value = "remain_count")
    private Integer remainCount;



    /**
     * 课程有效期
     */
    @TableField(value = "course_validity")
    private LocalDate courseValidity;

    /**
     * 已上课通知，0表示不通知，1表示通知
     */
    private Integer notification;

    /**
     * 评价
     */
    private String evaluation;

    /**
     * 是否消卡（逻辑删除，0表示未删除，1表示已删除）
     */
    private Integer deleted;
    /**
     * 老师ID
     */
    private Integer teacherId;

    private Integer classId;

    /**
     * 办卡时间
     */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 班级名称
     */
    @TableField(exist = false) // 该字段在数据库中不存在
    private String className;

    @TableField(exist = false)
    private List<Schedules> schedules;
//
//    @TableField(exist = false)
//    private List<String> studentNames;



    @TableField(exist = false)
    private List<Students> students;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}